home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / gamma.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  35 lines

  1. (Comp.sys.hp48) 
  2. Item: 625 by edp@alien.enet.dec.com 
  3. Author: [Eric Postpischil] 
  4.   Subj: The factorial (gamma) function 
  5.   Date: Fri Feb 14 1992 
  6.  
  7. In article <1992Feb11.201938.11196@athena.cs.uga.edu>, 
  8. rollie@marie.stat.uga.edu (Rollie Smith) writes... 
  9.  
  10. > The factorial function on the hp48 does something for non integers. 
  11.  
  12. Mathematicians have something called the gamma function, which is 
  13. written with the capital Greek letter gamma.  The definition is: 
  14. gamma(x) = integral from 0 to infinity of e^(-t)*t^(x-1) dt.  It so 
  15. happens that gamma(x+1) = x! for integers x.  Also, gamma(x+1) = 
  16. x*gamma(x) even for non-integers.  Anyway, when you use x! for 
  17. non-integers, you get gamma(x+1). 
  18.  
  19. The gamma function turns up in the volume of a sphere in a general 
  20. number of dimensions.  The volume of a "sphere" with radius r in n 
  21. dimensions is r^n*pi^(n/2) / gamma(n/2+1).  If you evaluate that for n 
  22. = 2 and 3, you will get the formulae for the area and volume of a 
  23. circle and sphere, respectively. 
  24.  
  25. If you ever have a product such as 1*3*5*7*... or 2*5*8*11*... that 
  26. you want to evaluate, the gamma function might be useful.  Since x! = 
  27. x*(x-1)!, (7/2)! = (7/2)*(5/2)*(3/2)*(1/2)*(-1/2)!, so 1*3*5*7 = 2^4 * 
  28. (7/2)! / (-1/2)!. Similarly, 2*5*8*11*...*(3*i-1) = 3^i * ((3*i-1)/3)! 
  29. / (-1/3)!. 
  30.  
  31.  
  32.                                        -- edp (Eric Postpischil) 
  33.                                        "Always mount a scratch monkey." 
  34.                                        edp@alien.enet.dec.com 
  35.